import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;

/**
 * Created by thoughtworker on 1/16/14.
 */
public class FootballManagerApp {
    public static void main(String[] args){
        InputReader inputReader = new InputReader(new BufferedReader(new InputStreamReader(System.in)));

        Catalog catalog = new Catalog();

        ArrayList<Player> playerArrayList = new ArrayList<Player>();
        playerArrayList.add(new Player("Player A"));
        ArrayList<Coach> coachArrayList = new ArrayList<Coach>();
        coachArrayList.add(new Coach("Coach A"));

        catalog.setPlayerList(playerArrayList);
        catalog.setCoachList(coachArrayList);


        HashMap<String, MenuAction> options = new HashMap<String, MenuAction>();
        options.put("list", new ListPlayersAction(System.out, catalog));
        options.put("find player", new FindPlayerAction(System.out, inputReader, catalog));

        new mainMenu(System.out, inputReader, catalog, options).run();
    }
}
